from pydsxkline.dsxkline import DsxKline,CycleType,FqType,DsxThemeName,DrawModel,ChartType

def on_crossing(data,index:int):
    print('on_crossing recive '+str(index))

def get_datas():
    # 日线数据
    datas = [
        "20210915,3651.16,3677.53,3638.32,3656.22,474970001.00,60423154.41",
        "20210916,3664.84,3677.92,3606.73,3607.09,546741474.00,67395534.04",
        "20210917,3595.27,3620.96,3569.27,3613.97,516850210.00,62883439.43",
        "20210922,3563.21,3629.45,3560.50,3628.49,472296053.00,55987472.96",
        "20210923,3651.27,3670.95,3632.28,3642.22,534995486.00,63321892.91",
        "20210924,3637.87,3651.43,3607.79,3613.07,507304772.00,60678860.91",
        "20210927,3625.96,3640.81,3559.92,3582.83,510802795.00,64067364.82",
        "20210928,3577.89,3610.92,3568.82,3602.22,444168807.00,50008199.61",
        "20210929,3573.52,3573.52,3518.05,3536.29,452511151.00,51110692.63",
        "20210930,3541.93,3572.43,3541.93,3568.17,395629626.00,44573470.31",
        "20211008,3609.09,3612.55,3571.73,3592.17,407161148.00,49296482.64",
        "20211011,3600.36,3614.70,3586.75,3591.71,394361159.00,46867383.14",
        "20211012,3581.30,3583.64,3515.14,3546.94,405393748.00,46198349.21",
        "20211013,3543.49,3569.13,3515.65,3561.76,325050667.00,40502000.88",
        "20211014,3555.11,3569.69,3547.18,3558.28,294969196.00,37751926.31",
        "20211015,3551.99,3578.77,3542.69,3572.37,320292984.00,42592472.09",
        "20211018,3571.05,3571.05,3539.48,3568.14,340950616.00,45578789.34",
        "20211019,3562.30,3596.79,3560.62,3593.15,334197652.00,44018153.18",
        "20211020,3583.24,3596.05,3574.30,3587.00,344245008.00,45048295.09",
        "20211021,3590.05,3610.96,3576.35,3594.78,352310867.00,45357167.25",
        "20211022,3594.75,3607.58,3578.76,3582.60,353157203.00,45544125.01",
        "20211025,3574.26,3611.09,3564.21,3609.86,321196816.00,44396162.88",
        "20211026,3612.83,3625.02,3589.71,3597.64,337278291.00,46517959.37",
        "20211027,3589.86,3589.86,3553.13,3562.31,350620940.00,47077779.41",
        "20211028,3548.70,3552.04,3509.49,3518.42,378171666.00,50298276.81",
        "20211029,3519.33,3547.34,3502.80,3547.34,358809377.00,52723183.14",
        "20211101,3530.40,3556.59,3519.29,3544.48,382251325.00,56410025.51",
        "20211102,3543.38,3559.05,3477.66,3505.63,417563173.00,58551946.98",
        "20211103,3501.11,3512.61,3480.49,3498.54,306607669.00,44911512.67",
        "20211104,3505.89,3527.95,3503.01,3526.87,319440829.00,46882917.96",
        "20211105,3520.21,3525.87,3491.46,3491.57,354533565.00,48582322.35",
        "20211108,3491.97,3507.27,3484.24,3498.63,298183722.00,42196807.54",
        "20211109,3507.11,3514.95,3489.04,3507.00,287315989.00,42120070.33",
        "20211110,3498.94,3498.94,3448.44,3492.46,307030708.00,44311274.23",
        "20211111,3486.45,3534.20,3482.83,3532.79,322087957.00,46480385.92",
        "20211112,3534.15,3543.65,3527.39,3539.10,308683354.00,44339836.70",
        "20211115,3542.90,3550.44,3521.29,3533.30,313017612.00,46406540.57",
        "20211116,3530.46,3549.77,3517.81,3521.79,310399909.00,44470078.28",
        "20211117,3518.56,3537.51,3513.52,3537.37,276735671.00,40155231.79",
        "20211118,3531.49,3537.98,3513.11,3520.71,312426927.00,43289831.42",
        "20211119,3519.28,3561.91,3517.65,3560.37,317989976.00,44059360.60",
        "20211122,3562.76,3585.19,3562.75,3582.08,330009385.00,50912340.70",
        "20211123,3580.51,3598.38,3577.36,3589.09,360011593.00,50808389.38",
        "20211124,3590.02,3602.74,3575.29,3592.70,336775246.00,48102042.00",
        "20211125,3593.39,3597.15,3579.53,3584.18,306451518.00,45055884.31",
        "20211126,3576.11,3576.11,3554.88,3564.09,301000066.00,43462523.61",
        "20211129,3528.67,3563.68,3526.36,3562.70,333618331.00,49003817.02",
        "20211130,3570.75,3582.12,3546.36,3563.89,349187938.00,49360551.80",
        "20211201,3561.89,3576.89,3558.69,3576.89,329873517.00,46752279.06",
        "20211202,3573.25,3586.87,3567.14,3573.84,354041524.00,46842482.82",
        "20211203,3576.45,3608.47,3573.21,3607.43,377551048.00,49356555.48",
        "20211206,3615.24,3626.13,3586.81,3589.31,418676743.00,52822967.08",
        "20211207,3611.22,3614.22,3572.57,3595.09,403842594.00,52411945.94",
        "20211208,3602.82,3637.72,3591.99,3637.57,361036657.00,48603435.21",
        "20211209,3641.16,3688.40,3638.70,3673.04,431918157.00,56852938.96",
        "20211210,3654.37,3667.85,3651.35,3666.35,419988801.00,55632424.05",
        "20211213,3686.94,3708.94,3678.06,3681.08,424092009.00,57418796.17",
        "20211214,3669.81,3671.68,3654.66,3661.53,362171934.00,48746852.13",
        "20211215,3655.05,3668.40,3645.24,3647.63,377477667.00,48113437.03",
        "20211216,3648.93,3675.02,3644.66,3675.02,381329507.00,46591135.95",
        "20211217,3670.26,3673.65,3631.66,3632.36,408487837.00,49195292.35",
        "20211220,3620.04,3643.95,3589.36,3593.60,423851410.00,49182898.76",
        "20211221,3591.45,3627.09,3591.45,3625.13,408184348.00,42837939.23",
        "20211222,3632.68,3635.90,3616.55,3622.62,394825177.00,43245130.66",
        "20211223,3625.47,3643.55,3618.05,3643.34,382925734.00,44998815.27",
        "20211224,3645.39,3648.96,3612.07,3618.05,390347625.00,47626114.63",
        "20211227,3613.05,3632.19,3601.94,3615.97,329235293.00,40748264.84",
        "20211228,3619.64,3631.08,3607.36,3630.11,316202242.00,40876136.97",
        "20211229,3630.92,3630.92,3596.32,3597.00,305131766.00,41042533.95",
        "20211230,3596.49,3628.92,3595.50,3619.19,307839291.00,41394769.28",
        "20211231,3626.24,3642.84,3624.94,3639.78,329681932.00,43348980.31",
        "20220104,3649.15,3651.89,3610.09,3632.33,405027769.00,51025106.06",
        "20220105,3628.26,3628.26,3583.47,3595.18,423902028.00,53896363.17",
        "20220106,3581.22,3594.49,3559.88,3586.08,371540543.00,47428429.00",
        "20220107,3588.99,3607.23,3577.10,3579.54,436306961.00,50289143.54",
        "20220110,3572.74,3593.52,3555.13,3593.52,356222610.00,44340084.86",
        "20220111,3589.90,3602.15,3562.75,3567.44,359761863.00,44130056.69",
        "20220112,3578.16,3599.50,3572.10,3597.43,343132956.00,43581789.30",
        "20220113,3601.03,3601.07,3555.16,3555.26,369368365.00,45700541.93",
        "20220114,3544.07,3548.42,3519.32,3521.26,376937024.00,46319764.19",
        "20220117,3522.09,3546.09,3519.43,3541.67,312886733.00,43827298.16",
        "20220118,3541.89,3579.31,3531.33,3569.91,377146435.00,47083203.86",
        "20220119,3567.63,3578.73,3541.66,3558.18,333235269.00,42076336.42",
        "20220120,3556.23,3576.26,3540.55,3555.06,379509846.00,45970184.34",
        "20220121,3546.75,3547.00,3514.89,3522.57,326534880.00,41776892.26",
        "20220124,3508.24,3531.61,3500.14,3524.11,280268342.00,35800969.43",
        "20220125,3509.28,3519.83,3433.06,3433.06,327353813.00,38372773.75",
        "20220126,3442.69,3462.12,3417.76,3455.67,275122828.00,33831236.15",
        "20220127,3456.10,3456.36,3392.02,3394.25,280606534.00,34653395.79",
        "20220128,3407.59,3417.05,3356.56,3361.44,290855257.00,35377461.26",
        "20220207,3407.76,3434.03,3407.76,3429.58,320485211.00,35714042.29",
        "20220208,3428.54,3453.19,3390.46,3452.63,366093865.00,38796986.57",
        "20220209,3450.82,3484.74,3444.08,3479.95,350249936.00,39371998.98",
        "20220210,3481.91,3488.86,3464.22,3485.91,355666267.00,40496941.94",
        "20220211,3472.28,3500.15,3459.33,3462.95,361356090.00,42629792.35",
        "20220214,3451.85,3457.26,3415.45,3428.88,315274448.00,36167785.51",
        "20220215,3428.04,3447.49,3421.64,3446.09,275559322.00,34163887.65",
        "20220216,3457.07,3475.06,3453.80,3465.83,274993913.00,32556341.25",
        "20220217,3464.21,3480.97,3454.28,3468.04,297262682.00,35578312.57",
        "20220218,3451.63,3490.76,3447.03,3490.76,295149963.00,32722039.33",
        "20220221,3488.41,3492.20,3471.69,3490.61,301541740.00,34539858.61",
        "20220222,3473.29,3473.39,3437.67,3457.15,326279484.00,38767892.76",
        "20220223,3458.51,3490.76,3458.18,3489.15,325604895.00,41563033.98",
        "20220224,3474.37,3486.98,3400.21,3429.96,488354901.00,56979404.42",
        "20220225,3445.34,3480.18,3440.93,3451.41,377542556.00,44165949.06",
        "20220228,3450.32,3462.31,3425.52,3462.31,345838388.00,41380452.67",
        "20220301,3471.36,3491.13,3465.72,3488.83,326001662.00,41256247.12",
        "20220302,3478.29,3486.62,3467.00,3484.19,329367684.00,38014381.62",
        "20220303,3495.93,3500.29,3473.34,3481.11,412594289.00,44362177.72",
        "20220304,3459.98,3474.88,3437.70,3447.65,393526581.00,43066905.53",
        "20220307,3438.56,3438.56,3360.74,3372.86,393588999.00,45815689.48",
        "20220308,3372.55,3383.63,3287.34,3293.53,415926766.00,48562358.10",
        "20220309,3303.71,3321.48,3147.68,3256.39,466285569.00,51983329.96",
        "20220310,3312.18,3326.58,3291.24,3296.09,378336376.00,46608400.84",
        "20220311,3259.32,3315.66,3217.42,3309.75,384067127.00,45868705.47",
        "20220314,3271.89,3297.80,3223.53,3223.53,337968687.00,41805559.61",
        "20220315,3192.36,3196.92,3063.97,3063.97,465037164.00,50815841.01",
        "20220316,3107.67,3177.79,3023.30,3170.71,444667189.00,52230534.25",
        "20220317,3215.01,3260.17,3202.93,3215.04,420813458.00,53254948.40",
        "20220318,3207.15,3260.78,3197.36,3251.07,373035611.00,42841508.16",
        "20220321,3255.62,3267.50,3223.39,3253.69,354228488.00,42107628.97",
        "20220322,3249.54,3279.11,3239.53,3259.86,361196158.00,40279896.40",
        "20220323,3264.79,3279.89,3251.98,3271.03,349875370.00,40542203.35",
        "20220324,3256.06,3266.89,3236.66,3250.26,329006654.00,39072751.65",
        "20220325,3247.16,3257.11,3211.64,3212.24,340020006.00,38977039.60",
        "20220328,3185.17,3230.22,3159.83,3214.50,344994873.00,37447228.00",
        "20220329,3216.01,3229.18,3196.46,3203.94,316273649.00,36396446.87",
        "20220330,3217.59,3266.60,3216.30,3266.60,366753677.00,41300894.13",
        "20220331,3256.14,3272.04,3246.06,3252.20,398439934.00,42808903.36",
        "20220401,3234.67,3287.23,3226.30,3282.72,378210460.00,40567571.54",
        "20220406,3269.43,3288.11,3255.69,3283.43,429642779.00,43355639.25",
        "20220407,3267.81,3290.26,3236.48,3236.70,402626660.00,39808184.55",
        "20220408,3239.88,3257.09,3208.35,3251.85,413826799.00,41403725.84",
        "20220411,3239.86,3239.86,3156.51,3167.13,424160185.00,43512950.51",
        "20220412,3165.12,3214.54,3140.90,3213.33,418321923.00,42245584.90",
        "20220413,3199.80,3225.47,3183.53,3186.82,391156925.00,39821689.85",
        "20220414,3203.63,3240.00,3200.23,3225.64,371242344.00,40119163.21",
        "20220415,3210.70,3229.87,3200.13,3211.24,407842082.00,41349881.99",
        "20220418,3185.94,3204.03,3166.98,3195.52,347365123.00,36638080.79",
        "20220419,3192.09,3207.83,3174.71,3194.03,339944104.00,36276987.67",
        "20220420,3189.89,3191.83,3142.05,3151.05,362047037.00,37357270.81",
        "20220421,3138.43,3160.90,3069.68,3079.81,391934694.00,39654203.39",
        "20220422,3058.40,3105.66,3049.36,3086.92,342000563.00,34879363.11",
        "20220425,3034.27,3043.82,2928.51,2928.51,433606108.00,42707721.04",
        "20220426,2930.45,2957.68,2878.26,2886.43,401615154.00,39598596.13",
        "20220427,2866.82,2959.18,2863.65,2958.28,423060191.00,42292834.65",
        "20220428,2945.81,2991.51,2936.79,2975.48,375371775.00,38874302.19",
        "20220429,2986.06,3048.49,2968.33,3047.06,423932794.00,44042272.88",
        "20220505,3044.85,3082.23,3042.12,3067.76,383072875.00,40935200.32",
        "20220506,3011.32,3030.69,2992.72,3001.56,343264218.00,34621439.77",
        "20220509,2990.20,3015.94,2983.61,3004.14,292061556.00,29998325.89",
        "20220510,2965.78,3043.78,2957.40,3035.84,370660980.00,38401259.84",
        "20220511,3035.39,3100.90,3034.67,3058.70,423991912.00,47296338.22",
        "20220512,3044.80,3072.16,3032.95,3054.99,344440477.00,36887965.23",
        "20220513,3068.03,3086.10,3059.25,3084.28,331737852.00,34094219.27",
        "20220516,3100.55,3102.58,3063.40,3073.75,338108492.00,34895770.55",
        "20220517,3076.50,3093.70,3057.64,3093.70,330356537.00,35167129.85",
        "20220518,3095.89,3105.84,3071.31,3085.98,315037923.00,33884916.22",
        "20220519,3046.71,3096.96,3042.67,3096.96,336600749.00,36001821.07",
        "20220520,3107.09,3146.57,3107.09,3146.57,372336636.00,41530621.82",
        "20220523,3150.49,3150.51,3127.90,3146.86,353376325.00,38117856.92",
        "20220524,3149.06,3153.13,3070.93,3070.93,416312158.00,43860537.65",
        "20220525,3070.17,3107.63,3069.95,3107.46,342259227.00,34232216.77",
        "20220526,3111.48,3133.28,3079.48,3123.11,370305518.00,37736465.53",
        "20220527,3135.03,3151.05,3112.54,3130.24,359463866.00,37263159.55",
        "20220530,3141.96,3150.89,3123.15,3149.06,349362285.00,37666769.42",
        "20220531,3149.94,3188.60,3142.00,3186.43,374523265.00,43252802.19",
        "20220601,3179.69,3190.61,3160.04,3182.16,365664432.00,40241994.12",
        "20220602,3170.31,3197.28,3163.76,3195.46,361770632.00,41372926.39",
        "20220606,3196.96,3237.07,3181.65,3236.37,422027835.00,51731434.69",
        "20220607,3235.42,3253.09,3222.64,3241.76,402203220.00,48220319.69",
        "20220608,3245.02,3266.63,3216.01,3263.79,434183270.00,50840853.49",
        "20220609,3259.49,3270.56,3223.48,3238.95,422728372.00,46845821.43",
        "20220610,3214.18,3286.62,3210.81,3284.83,439865730.00,50415368.11",
        "20220613,3256.28,3272.99,3229.31,3255.55,438578312.00,51196617.18",
        "20220614,3224.21,3289.13,3195.82,3288.91,450388187.00,51384498.95",
        "20220615,3289.10,3358.55,3288.85,3305.41,550584131.00,62197252.77",
        "20220616,3306.84,3319.69,3277.53,3285.38,433220868.00,50605399.38",
        "20220617,3265.51,3323.28,3262.89,3316.79,395300700.00,49725217.02",
        "20220620,3315.78,3333.90,3292.93,3315.43,413460410.00,52775175.80",
        "20220621,3313.79,3329.39,3279.83,3306.72,394456891.00,47179364.54",
        "20220622,3309.12,3311.02,3266.54,3267.20,375529782.00,44085099.43",
        "20220623,3269.05,3320.15,3262.29,3320.15,400614211.00,47420010.75",
        "20220624,3324.74,3356.71,3322.95,3349.75,390819734.00,50961599.85",
        "20220627,3364.00,3393.31,3364.00,3379.19,414117738.00,54157384.61",
        "20220628,3377.68,3412.10,3358.87,3409.21,412056516.00,52551250.93",
        "20220629,3399.68,3414.65,3358.47,3361.52,440573559.00,56130697.68",
        "20220630,3358.93,3417.01,3358.93,3398.62,381243178.00,51030720.29",
        "20220701,3400.26,3404.05,3378.36,3387.64,350489299.00,45843528.85",
        "20220704,3381.82,3405.62,3364.09,3405.43,357737919.00,48934795.53",
        "20220705,3411.13,3424.84,3372.06,3404.03,411699672.00,51660570.39",
        "20220706,3391.03,3391.03,3333.10,3355.35,384630047.00,48747466.69",
        "20220707,3353.13,3375.86,3332.31,3364.40,334400202.00,43820311.29",
        "20220708,3380.37,3386.31,3354.12,3356.08,322921072.00,42188393.31",
        "20220711,3341.10,3341.10,3297.01,3313.58,342669193.00,42494226.63",
        "20220712,3307.22,3319.25,3277.08,3281.47,334600539.00,41095056.07",
        "20220713,3279.60,3297.02,3266.48,3284.29,331845669.00,39413461.75",
        "20220714,3277.45,3299.25,3261.49,3281.74,355926432.00,43196935.35",
        "20220715,3261.38,3288.92,3228.06,3228.06,380156371.00,46087701.91",
        "20220718,3235.09,3278.47,3226.23,3278.10,348346022.00,42335727.23",
        "20220719,3278.72,3283.93,3256.02,3279.43,315651918.00,39604235.83",
        "20220720,3291.55,3308.35,3287.74,3304.72,301515123.00,38342274.68",
        "20220721,3297.66,3300.53,3272.00,3272.00,332358707.00,42069657.67",
        "20220722,3276.20,3293.64,3246.73,3269.97,300690066.00,38357601.16",
        "20220725,3269.71,3273.18,3243.03,3250.39,271245744.00,34828187.10",
        "20220726,3254.19,3282.41,3246.04,3277.44,259468676.00,33442158.70",
        "20220727,3271.78,3282.57,3265.73,3275.76,249131485.00,33976824.11",
        "20220728,3287.50,3305.71,3277.11,3282.58,288055056.00,39592555.55",
        "20220729,3282.81,3294.80,3246.37,3253.24,307331047.00,41055309.34",
        "20220801,3246.62,3264.30,3225.55,3259.96,292204805.00,39900023.97",
        "20220802,3231.26,3231.26,3155.19,3186.27,394176168.00,47596269.62",
        "20220803,3188.89,3217.55,3159.46,3163.67,324885673.00,45540976.49",
        "20220804,3179.43,3191.00,3155.70,3189.04,260898943.00,37114691.61",
        "20220805,3195.23,3228.89,3184.45,3227.03,274683729.00,41405564.15",
        "20220808,3218.85,3237.97,3214.08,3236.93,254268050.00,39227717.85",
        "20220809,3235.74,3248.77,3227.54,3247.43,259605467.00,39141556.03",
        "20220810,3242.36,3253.17,3217.81,3230.02,257583592.00,39006612.01",
        "20220811,3243.47,3281.67,3237.90,3281.67,300605376.00,42739914.96",
        "20220812,3275.77,3288.22,3272.84,3276.89,299932928.00,40390615.63",
        "20220815,3268.37,3286.89,3261.82,3276.09,287106773.00,38725774.46",
        "20220816,3278.68,3295.02,3271.57,3277.88,303592274.00,40921008.23",
        "20220817,3282.10,3296.00,3263.35,3292.53,326124759.00,42385901.14",
        "20220818,3286.37,3289.14,3270.56,3277.54,301694778.00,41807519.97",
        "20220819,3275.62,3286.49,3258.06,3258.08,333535471.00,45786336.11",
        "20220822,3249.70,3278.17,3247.19,3277.79,314537869.00,42765329.58",
        "20220823,3274.43,3284.60,3262.63,3276.22,316566356.00,41831174.40",
        "20220824,3279.17,3281.88,3212.39,3215.20,366140577.00,45836027.84",
        "20220825,3223.46,3248.35,3199.12,3246.25,336196165.00,41946427.70",
        "20220826,3250.63,3266.27,3232.28,3236.22,309927554.00,39755625.13",
        "20220829,3203.10,3240.73,3199.00,3240.73,297015097.00,36372997.98",
        "20220830,3240.18,3243.75,3212.63,3227.22,294318914.00,35377567.38",
        "20220831,3216.53,3232.02,3184.39,3202.14,344408829.00,43175800.74",
        "20220901,3196.54,3214.56,3181.63,3184.98,274660541.00,33697864.12",
        "20220902,3189.64,3198.28,3173.79,3186.48,250456911.00,31333760.41",
        "20220905,3183.95,3199.91,3172.04,3199.91,280675633.00,33959153.63",
        "20220906,3207.93,3244.64,3203.82,3243.45,318869689.00,37863607.03",
        "20220907,3232.14,3253.77,3227.82,3246.29,301014466.00,36860874.15",
        "20220908,3245.56,3253.70,3233.80,3235.59,281680358.00,32865709.16",
        "20220909,3241.18,3266.20,3236.51,3262.05,283827665.00,33856671.33",
        "20220913,3272.05,3278.17,3259.66,3263.80,276189823.00,33902189.06",
        "20220914,3224.68,3250.80,3221.96,3237.54,255193365.00,30645282.22",
        "20220915,3248.97,3254.18,3174.39,3199.92,325206121.00,39249059.15",
        "20220916,3189.83,3191.83,3126.40,3126.40,316475893.00,35508534.29",
        "20220919,3122.75,3135.56,3101.22,3115.60,249113662.00,28991881.71",
        "20220920,3127.84,3140.03,3114.04,3122.41,219942534.00,26860030.02",
        "20220921,3116.01,3129.82,3091.30,3117.18,232972496.00,26951375.45",
        "20220922,3098.77,3125.68,3092.82,3108.91,221140689.00,26997859.77",
        "20220923,3106.81,3124.66,3072.24,3088.37,243057719.00,28555291.52",
        "20220926,3067.57,3102.65,3048.51,3051.23,262698628.00,29353644.08",
        "20220927,3056.39,3094.04,3048.37,3093.86,232735303.00,29006570.27",
        "20220928,3089.10,3089.10,3044.86,3045.07,230098650.00,27603974.16",
        "20220929,3067.47,3076.76,3026.08,3041.20,230030416.00,27644105.94",
        "20220930,3042.17,3054.61,3021.93,3024.39,204115336.00,24026276.84",
        "20221010,3026.94,3029.45,2968.28,2974.15,243404828.00,29012002.42",
        "20221011,2978.06,2986.91,2953.50,2979.79,208635950.00,24671563.70",
        "20221012,2976.72,3025.51,2934.09,3025.51,248013557.00,30687132.88",
        "20221013,3008.30,3036.25,3004.50,3016.36,249683281.00,31776478.67",
        "20221014,3035.03,3084.27,3035.03,3071.99,277304061.00,37205069.46",
        "20221017,3060.52,3087.19,3052.71,3084.94,262608618.00,34921446.97",
        "20221018,3094.93,3099.92,3074.22,3080.96,245634757.00,32600290.54",
        "20221019,3073.26,3081.39,3044.38,3044.38,230895310.00,31310834.87",
        "20221020,3029.30,3070.26,3013.69,3035.05,244736145.00,34009133.78",
        "20221021,3038.04,3055.42,3026.96,3038.93,245254122.00,31511098.58",
        "20221024,3034.75,3064.42,2965.17,2977.56,298085356.00,39472594.25",
        "20221025,2969.16,3001.72,2944.26,2976.28,255554160.00,33751928.08",
        "20221026,2977.56,3028.35,2977.56,2999.50,268689492.00,37284527.46",
        "20221027,3005.04,3017.26,2981.69,2982.90,265608254.00,38133037.11",
        "20221028,2967.02,2974.24,2908.98,2915.93,292531308.00,38526136.19",
        "20221031,2893.20,2926.02,2885.09,2893.48,301994203.00,39665416.21",
        "20221101,2899.50,2969.20,2896.76,2969.20,319809578.00,43101590.29",
        "20221102,2960.65,3019.05,2954.95,3003.37,325078248.00,45758152.20",
        "20221103,2981.20,3003.72,2977.72,2997.81,259348567.00,37065328.38",
        "20221104,2997.00,3081.59,2997.00,3070.80,329806740.00,45877009.37",
        "20221107,3062.86,3088.19,3054.46,3077.82,320567097.00,42442913.15",
        "20221108,3077.31,3078.28,3047.46,3064.49,256522007.00,33896694.20",
        "20221109,3064.46,3073.92,3046.19,3048.17,235637324.00,30686089.57",
        "20221110,3031.69,3047.98,3022.85,3036.13,270371798.00,33592591.77",
        "20221111,3099.65,3117.74,3070.30,3087.29,409604534.00,51378459.73",
        "20221114,3100.87,3121.41,3075.22,3083.40,361788216.00,45454673.14",
        "20221115,3081.13,3135.59,3074.50,3134.08,331470577.00,44646000.79",
        "20221116,3133.65,3145.75,3115.35,3119.98,303429844.00,38699290.51",
        "20221117,3110.96,3115.44,3087.17,3115.43,287028407.00,37790010.93",
        "20221118,3116.73,3126.71,3096.89,3097.24,299954276.00,38920738.65",
        "20221121,3078.06,3085.24,3056.17,3085.04,256045549.00,34502549.65",
        "20221122,3084.23,3118.12,3076.32,3088.94,327565927.00,37414282.11",
        "20221123,3084.74,3108.24,3075.32,3096.91,326155449.00,35640084.43",
        "20221124,3104.10,3113.24,3084.86,3089.31,267482928.00,30819018.58",
        "20221125,3085.46,3111.42,3077.97,3101.69,311431979.00,32542633.84",
        "20221128,3055.29,3080.18,3034.70,3078.55,305811284.00,33854935.08",
        "20221129,3096.11,3152.00,3096.11,3149.75,391449748.00,43910261.93",
        "20221130,3141.40,3158.57,3137.37,3151.34,372718321.00,40450437.93",
        "20221201,3187.99,3198.41,3164.53,3165.47,387013056.00,46218497.40",
        "20221202,3160.58,3170.90,3149.84,3156.14,307812484.00,36631867.88",
        "20221205,3181.92,3213.44,3177.06,3211.81,447398437.00,47920361.74",
        "20221206,3200.28,3224.82,3195.08,3212.53,373590296.00,43524870.02",
        "20221207,3204.94,3226.08,3188.67,3199.62,354113078.00,40214613.31",
        "20221208,3196.02,3206.72,3187.26,3197.35,320969294.00,36493562.27",
        "20221209,3197.12,3212.11,3182.91,3206.95,373343209.00,44775022.20",
        "20221212,3195.87,3196.72,3176.58,3179.04,333381792.00,39491961.53",
        "20221213,3179.44,3187.20,3171.48,3176.33,285821200.00,33353976.30",
        "20221214,3178.55,3189.84,3168.59,3176.53,265623569.00,33395067.11",
        "20221215,3177.20,3179.10,3158.45,3168.65,243023333.00,30520499.86",
        "20221216,3156.13,3175.35,3151.61,3167.86,259771795.00,30722773.84",
        "20221219,3165.31,3170.26,3096.10,3107.12,278513541.00,30793462.15",
        "20221220,3098.95,3100.75,3061.51,3073.77,218836766.00,26171607.34",
        "20221221,3078.33,3085.80,3060.55,3068.41,189067920.00,22685279.26",
        "20221222,3085.80,3096.24,3044.60,3054.43,223639537.00,26631547.74",
        "20221223,3038.84,3061.87,3031.54,3045.87,192020305.00,23333524.62",
        "20221226,3048.20,3071.84,3047.35,3065.56,206503893.00,25547026.53",
        "20221227,3077.75,3098.08,3074.31,3095.57,222218322.00,26794678.54",
        "20221228,3088.62,3098.65,3079.43,3087.40,224554151.00,26050852.57",
        "20221229,3076.73,3086.00,3064.46,3073.70,215570676.00,25391698.12",
        "20221230,3084.52,3096.31,3082.20,3089.26,217545344.00,25035595.09",
        "20230103,3087.51,3119.86,3073.05,3116.51,281370362.00,33139213.89",
        "20230104,3117.57,3129.09,3109.45,3123.52,273313626.00,31639122.87",
        "20230105,3132.76,3159.43,3130.23,3155.22,257003018.00,33563593.45",
        "20230106,3155.07,3170.74,3151.84,3157.64,257380255.00,33853984.37",
        "20230109,3169.37,3183.58,3165.43,3176.08,258115218.00,34269377.10",
        "20230110,3178.02,3178.16,3165.14,3169.51,232984175.00,31035769.86",
        "20230111,3172.38,3184.76,3160.89,3161.84,237742869.00,30924889.29",
        "20230112,3167.27,3171.59,3153.40,3166.15,167801770,21360740"
    ]
    return datas

if __name__ == "__main__":
    DsxKline.show("sh000001","上证指数")
    # DsxKline.show("sh000001","上证指数",CycleType.t5)
    # DsxKline.show("sh000001","上证指数",CycleType.day,FqType.qfq,theme=DsxThemeName.white,sides=["VOL","MACD","KDJ","RSI","WR","CCI","PSY","BIAS"],height=1600)
    # DsxKline.show("sh000001","上证指数",CycleType.week,on_crossing=on_crossing)
    # DsxKline.show("sh000001","上证指数",CycleType.month)
    # DsxKline.show("sh000001","上证指数",CycleType.m1)

    def draw_event():
        return [
        DsxKline.draw_circle_with_date("20230313","卖","green","#ffffff",3268.7),
        DsxKline.draw_circle_with_date("20221230","买","red","#ffffff"),
        DsxKline.draw_circle_with_date("202303241104","买","red","#ffffff")
        ]

    header = """
        
        <h1 style="color:#fff;text-align:center;font-size:20px;line-height:50px;border-bottom:1px solid #191b28"> pydsxkline </h1>
        <ul class="mycss">
            <li><span>累计收益率：</span><b>30.6%</b></li>
            <li><span>年化收益率：</span><b>80.6%</b></li>
            <li><span>夏普比率：</span><b>0.35</b></li>
            <li><span>盈亏比：</span><b>1.2</b></li>
            <li><span>胜率：</span><b>67.6%</b></li>
            <li><span>最大回撤：</span><b>30.6%</b></li>
            <li><span>最大收益率：</span><b>10.6%</b></li>
            <li><span>最小收益率：</span><b>-8.6%</b></li>
            <li><span>总资产：</span><b>240098.9 元</b></li>
            <li><span>盈利：</span><b>20366 元</b></li>
            <li><span>亏损：</span><b>-90880 元</b></li>
        </ul>
        <style>
            .mycss{
                list-style:none;
                padding:10px 20px;
                color:#c5cbc0;
                font-size:14px;
            }
            .mycss li{
                float:left;
                width:25%;
                padding:5px 0;
            }
            .mycss li span{
                color:#c5cbce;
            }
        </style>
    """

    # 自定义指标数据
    # 这个要准备跟K线数据一一对应的指标数据
    # 指标名称
    name1 = "MYMA"
    def _install_js():
        # 指标值名称 MA10，line 画折线，颜色 #ff0000
        _model = [DrawModel("MA10","line","#ff0000")]
        # 支持蜡烛图
        _chartType = [ChartType.candle]
        # 副图 sides 或者主图 main 或者两者
        _location = ["sides"]
        # 指标数据
        _datas = []
        # 这里模拟计算一个均线指标
        N = 10
        klines = get_datas()
        for i in range(len(klines)):
            if i>=N:
                amount = 0
                for j in range(max(0,i-N+1),i+1):
                    subitem = klines[j]
                    subobj = subitem.split(",")
                    close = float(subobj[4])
                    amount += close
                MA10 = amount / N
                _datas.append({"MA10":MA10})
            else:
                _datas.append({"MA10":None})
        
        # 生成js 
        install_js = DsxKline.get_install_index_js(name1,_model,_chartType,_location,_datas)
        return install_js
    

    # 自定义指标算法，这个比较麻烦，算法需要用js来写
    name2 = "MYMAMA"
    def _create_index_js():
        # 指标值名称 MA10，line 画折线，颜色 #ff0000
        _model = [
            DrawModel("MA10","line","#ff0000"),
            DrawModel("MA30","line","#ffff00")
        ]
        # 支持蜡烛图
        _chartType = [ChartType.candle]
        # 副图 sides 或者主图 main 或者两者
        _location = ["sides"]
        # 指标算法帧函数
        _func = """
        // 这里写js函数代码
        var _name2 = "%s";
        var _func = function(){
            
            // 取得当前坐标数据
            var item = this.datas[this.day];
            // 初始化指标
            if (item.ZHIBIAO[_name2] == null)
                item.ZHIBIAO[_name2] = {
                };
            // 开始计算指标值，这里我们计算个均线指标吧
            var N = 10;
            if(this.day<N) {
                item.ZHIBIAO[_name2]["MA10"] = null;
                item.ZHIBIAO[_name2]["MA30"] = null;
                return;
            }
            var amount = 0;
            for(var i=Math.max(this.day-N+1,0);i<=this.day;i++){
                var subitem = this.datas[i];
                amount += subitem.CLOSE;
            }
            var MA10 = amount / N;
            item.ZHIBIAO[_name2]["MA10"] = MA10;
            N = 30;
            if(this.day<N) {
                item.ZHIBIAO[_name2]["MA30"] = null;
                return;
            }
            amount = 0;
            for(var i=Math.max(this.day-N+1,0);i<=this.day;i++){
                var subitem = this.datas[i];
                // 这里模型数据里有K线所有的字段值可以引用
                amount += subitem.CLOSE;
            }
            var MA30 = amount / N;
            // 保存指标值
            item.ZHIBIAO[_name2]["MA30"] = MA30;
        }
        """ % name2
        # 生成js 
        create_js = DsxKline.get_create_index_js(name2,_model,_chartType,_location,_func)
        return create_js


    DsxKline.show("sh000001","上证指数",CycleType.day,draw_event=draw_event(),debug=True,main=["SAR"],sides=[name1,name2,"VOL","MACD","KDJ"],header_html=header,header_height=160,datas=get_datas(),enable_data_api=False,install_index_js=_install_js(),create_index_js=_create_index_js())